package chapter4.No4_1_使用reentrantLock类.demo2;

/**
 * *：使用ReentrantLock实现同步：测试2
 *
 * @author liujian
 * @version 2016/11/21 0021
 */
public class Main {
    public static void main(String[] args) {
        ServiceClass sc = new ServiceClass();
        ThreadA a = new ThreadA(sc);
        a.setName("a");
        ThreadA aa = new ThreadA(sc);
        aa.setName("aa");

        ThreadB b = new ThreadB(sc);
        b.setName("b");
        ThreadB bb = new ThreadB(sc);
        bb.setName("bb");

        a.start();
        aa.start();
        b.start();
        bb.start();

    }
}
